home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / EARCD / comm / mail / YamSendmail.lha / sendmail
Text File  |  1996-11-10  |  1KB  |  44 lines

  1. /* sendmail - send email from TIN using YAM (Thanks Marcel :)
  2.               partially edited from sendamail.rexx by blitter@planetx.lanz.com
  3.    Installation:
  4.      Copy sendmail (this file :) to c:sendmail
  5.      Protect c:sendmail +s
  6.      assign uucp: sys: (or wherever partition your c: is at)
  7.    Bugs: Only one so far, you get the newsreader sig and the Yam sig
  8.          in the message. The might be a way to disable reading of
  9.          the Yam sig, but I couldn't find it.
  10.  
  11.    Addition: 10-nov-1996, works with AwewII2.1. Use Auto-Sendmail config in
  12.              AwebII. 
  13.  
  14. */
  15. tmpfile = 'T:SendAMail.tmp'
  16. IF ~SHOW('Ports','YAM') THEN DO
  17.   ADDRESS 'COMMAND'
  18.   'Run YAM:YAM NOCHECK HIDE'
  19.   'SYS:RexxC/WaitForPort YAM'
  20. END
  21. IF SHOW('Ports','YAM') THEN DO
  22.   IF OPEN(out,tmpfile,'write') THEN DO
  23.     line = READLN(STDIN); PARSE VAR line 'To: 'rcpt
  24.     line = READLN(STDIN); PARSE VAR line 'Subject: 'subj 
  25. /*   CALL READLN(STDIN)*/ 
  26. /*   CALL READLN(STDIN)*/
  27.     DO WHILE ~EOF(STDIN)
  28.       CALL WRITELN(out,READLN(STDIN))
  29.     END
  30.  
  31.     CALL CLOSE(out)
  32.     ADDRESS 'YAM'
  33.     rcpt = WORD(rcpt,1) /* added for prob with Alias in mailto (dk)*/
  34.     WriteMailTo rcpt
  35. /*   'WriteSubject 'subj */
  36.    'WriteSubject "'subj'"' 
  37.     WriteLetter tmpfile
  38.     WriteSend
  39.     ADDRESS COMMAND 'Delete >NIL: 'tmpfile
  40.   END
  41. END
  42.  
  43.  
  44.